package com.ictech.print.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

import com.ictech.print.BaseApplication;

public class PreferencesUtil {

	public static void set(String key, String value) {
		Context ctx = BaseApplication.app;
        SharedPreferences sp =ctx.getSharedPreferences("sp", ctx.MODE_PRIVATE);
        Editor editor=sp.edit();
        editor.putString(key, value);
        editor.commit();
	}
	
	public static String get(String key) {
		Context ctx = BaseApplication.app;
        SharedPreferences sp =ctx.getSharedPreferences("sp", ctx.MODE_PRIVATE);
        return sp.getString(key, "");
	}
	
}
